package com.rick.test;

import cn.hutool.http.HttpRequest;
import cn.hutool.json.JSONUtil;

import java.util.concurrent.TimeUnit;

public class Ctest {

    public static void main(String[] args) throws InterruptedException {
        String url = "http://10.101.108.142:32217/notification-web-api/api/v2/push/pushData";

        String json ="{\n" +
                "    \"did\": \"1645208\",\n" +
                "    \"openId\": \"5f2bb768\",\n" +
                "    \"data\": \"hello world,Yes, please reply\"\n" +
                "}";
        for (int i = 0; i < 100; i++) {
            String body = HttpRequest.post(url)
                    .body(JSONUtil.toJsonStr(json))
                    .execute().body();
            System.out.println("body = " + body);
            TimeUnit.SECONDS.sleep(5);
        }



    }
}
